<jsp:include page="header.jsp" />
<div id="page-wrapper" style="height:750px">
	
	  <div class="col-sm-10 col-sm-offset-2">
      
				<div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">
                            MetaQue Bank <small>Home Page</small>
                        </h1>
                        <ol class="breadcrumb">
                            <li class="active">
                                <i class="fa fa-dashboard"></i> HomePage
                            </li>
                        </ol>
                    </div>
                </div>
                <!-- /.row -->
				<div class="col-lg-10" >
		
		
			<div ng-app="">
				<div ng-controller="myController" data-ng-init="init()" id="jsController">

					<div>
						<div ng-repeat="quesList in quesList">

							<div class="col-lg-11">
						
							
								<div class="panel panel-default">
									<div class="panel-heading ">
										<h3 class="panel-title">
											<i class="fa fa-quote-left"></i> 
												<div class="pull right col-sm-offset-10">
												<div id="remove">
												  <span class="label label-default">Remove</span>
												  
												   <span class="label label-default">Close</span>
												</div>
											</div>	
											<a href="javascript:;" data-toggle="collapse" data-target="#{{quesList.qId}}">

												{{quesList.qTitle}}<i class="fa fa-quote-right"></i></a>
											
												
										</h3>
										 <br>
										<div>
											Posted By : <a class="text-left ">{{quesList.postedBy}} </a>
											<span class="badge text-right col-sm-offset-8">Posted
												on : {{quesList.qAskedDate}}</span>
										</div>


									</div>
									<div class="panel-body collapse" id="{{quesList.qId}}">
										<div>{{quesList.qBody}} QUESTION BODY HERE</div>

										<div class="text-right">
											<a href="/MetaQBank/postAnswer.jsp?qId={{quesList.qId}}&qTitle={{quesList.qTitle}}&qBody={{quesList.qBody}}">Post Your Answer <i
												class="fa fa-arrow-circle-right"></i></a>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			

		</div>
	</div>
	</div>
	
	<script>
	function myController($scope, $http) {

		$http
				.get(
						"http://localhost:8080/MetaQBank/rest/question/recentQuestions")
				.success(function(response) {

					$scope.quesList = response;

				});

	}
</script>